package com.example.util;

import java.io.Serializable;

/**
 * Created by lianlei on 2017/1/13.
 */
public class Result implements Serializable {
    private Integer c = MessageCode.MESSAGE_DATA_SUCCESS;

    private String m = "";

    private Object d;

    public static final Result getNew(){
        return new Result();
    }

    public static final Result getFailed(){
        return new Result().setC(MessageCode.MESSAGE_PARAMETER_ERROR);
    }

    public Integer getC() {
        return c;
    }

    public Result setC(Integer c) {
        this.c = c;
        return this;
    }

    public String getM() {
        return m;
    }

    public Result setM(String m) {
        this.m = m;
        return this;
    }

    public Object getD() {
        return d;
    }

    public Result setD(Object d) {
        this.d = d;
        return this;
    }

}
